<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<%
	String path = request.getContextPath();
	String basePath = request.getScheme() + "://"
			+ request.getServerName() + ":" + request.getServerPort()
			+ path + "/";
%>
<%@ taglib uri="/WEB-INF/tld/framework.tld" prefix="mayi"%>
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<base href="<%=basePath%>">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>酸辣土豆丝 - DeathGhost</title>
<meta name="keywords" content="DeathGhost,DeathGhost.cn,web前端设,移动WebApp开发" />
<meta name="description" content="DeathGhost.cn::H5 WEB前端设计开发!" />
<meta name="author" content="DeathGhost"/>
<link href="style/style.css" rel="stylesheet" type="text/css" />
<script type="text/javascript" src="js/public.js"></script>
<script type="text/javascript" src="js/jquery.js"></script>
<script type="text/javascript" src="js/jqpublic.js"></script>
<!--
Author: DeathGhost
Author URI: http://www.deathghost.cn
-->
<script>
$(function(){		
	$('.title-list li').click(function(){
		var liindex = $('.title-list li').index(this);
		$(this).addClass('on').siblings().removeClass('on');
		$('.menutab-wrap div.menutab').eq(liindex).fadeIn(150).siblings('div.menutab').hide();
		var liWidth = $('.title-list li').width();
		$('.shopcontent .title-list p').stop(false,true).animate({'left' : liindex * liWidth + 'px'},300);
	});
	
	$('.menutab-wrap .menutab li').hover(function(){
		$(this).css("border-color","#ff6600");
		$(this).find('p > a').css('color','#ff6600');
	},function(){
		$(this).css("border-color","#fafafa");
		$(this).find('p > a').css('color','#666666');
	});
	});
</script>
</head>
<body>
<header>
 <section class="Topmenubg">
  <div class="Topnav">
   <div class="LeftNav">
    <a href="<%=path %>/login/toRegister">注册</a>/<a href="<%=path %>/login/toLogin">登录</a>&nbsp;&nbsp;<a href="<%=path %>/shop/selectShop">首页</a>
   </div>
   <div class="RightNav">
    <a href="<%=path %>/user/toUser">用户中心</a> <a href="" target="_blank" title="我的订单">我的订单</a> <a href="cart.html">购物车（0）</a> <a href="user_favorites.html" target="_blank" title="我的收藏">我的收藏</a> <a href="<%=path %>/login/toRegisterBuss">商家入驻</a>
   </div>
  </div>
 </section>
 <div class="Logo_search">
  <div class="Logo">
   <img src="images/logo.jpg" title="DeathGhost" alt="模板">
   <i></i>
  </div>
 </div>
 <nav class="menu_bg">
  <ul class="menu">
   <li><a href="index.html">首页</a></li>
   <li><a href="list.html">订餐</a></li>
   <li><a href="category.html">积分商城</a></li>
   <li><a href="article_read.html">关于我们</a></li>
  </ul>
 </nav>
</header>
<!--Start content-->
<section class="slp">
 <section class="food-hd">
  <div class="foodpic">
   <img src="bussiness/show?foodPicture=${commodity.foodPicture}" id="showimg">
  </div>
  <div class="foodtext">
   <div class="foodname_a">
    <h1>${commodity.foodName }</h1>
    <p>${commodity.bussinessAddress }</p>
   </div>
   <div class="price_a">
    <p class="price01">价格：￥<span>${commodity.foodPrice }</span></p>
   </div>
   <div class="Freight">
    <span>配送费用：</span>
    <span>10.00</span>
   </div>
   <ul class="Tran_infor">
     <li>
      <p class="Numerical">${orderSumCount }</p>
      <p>销售量</p>
     </li>
     <li class="line">
      <p class="Numerical">${countcomment}</p>
      <p>累计评价</p>
     </li>
     <li>
      <p class="Numerical">59</p>
      <p>送幸福积分</p>
     </li>
   </ul>
   <form action="cart.html">
   <div class="BuyNo">
    <span>我要买：<input type="number" name="foodCount" required autofocus min="1" value="1"/>份</span>
    <div class="Buybutton">
     <input name="" type="submit" value="加入购物车" class="BuyB">
     <a href="shop/selectBussinessByBussId?foodId=${commodity.foodId}"><span class="Backhome">进入店铺首页</span></a>
    </div>
   </div>
   </form>
  </div>
 </section>
 <!--bottom content-->
 <section class="Bcontent">
  <article>
   <div class="shopcontent">
  <div class="title2 cf">
    <ul class="title-list fr cf ">
      <li class="on">详细说明</li>
      <li> 评价详情（${countcomment}）</li>
      <li>成交记录 ${ordercount}</li>
      <li>添加评论</li>
      <p><b></b></p>
    </ul>
  </div>
  <div class="menutab-wrap">
    <!--case1-->
    <div class="menutab show">
      <div class="cont_padding">
       <p>${commodity.foodBrief }</p>
      </div>
    </div>
    <!--case2-->
    <div class="menutab">
     <div class="cont_padding">
      <table class="Dcomment">
      <tr>
       <th width="80%">评价内容</th>
       <th width="20%">评价时间</th>
      </tr>
        <c:forEach var="comment" items="${comment}">
		<tr>
				<td class="FontW">${comment.commentText}</td>
				<td class="FontW">${comment.commentTime}</td>
		</tr>
		</c:forEach>
      </table>
    </div>
    </div>
    <!--case4-->
    <div class="menutab">
     <div class="cont_padding">
      <table width="888">
       <th width="35%">买家</th>
       <th width="20%">价格</th>
       <th width="15%">数量</th>
       <th width="30%">成交时间</th>
       <c:forEach items="${order}" var="order">
       <tr height="40">
        <td> ${order.userName }</td>
        <td>￥ ${order.orderPrice }</td>
        <td> ${order.foodCount }</td>
        <td> ${order.orderCreationTime }</td>
       </tr>
       </c:forEach>
      </table>
     </div>
   </div>
   <!--case5-->
    <div class="menutab">   
     <div class="cont_padding">
      <c:if test="${sessionScope.loginUser == null }">
   		   请先登录
      </c:if>
     <c:if test="${sessionScope.loginUser != null }">
     <form class="A-Message" action="<%=path %>/user/AddComment" method="post"> 
     	<input type="hidden" name="foodId" value="${commodity.foodId}">
      <p><i><h3>留言：</h3></i><textarea name="commentText" cols="50px" rows="10px" required placeholder="详细说明您的问题..."></textarea></p>
      <p><input type="submit" value="确定"/></p>
     </form>
     </c:if>
    </div>
   </div>
  </article>
  <!--ad&other infor-->
  <aside>
   <!--广告位或推荐位-->
   <a href="#" title="广告位占位图片" target="_blank"><img src="upload/2014912.jpg"></a>
  </aside>
 </section>
</section>
</body>
</html>
